import 'package:library_base/entities/generated/json/base/json_convert_content.dart';
import 'package:library_base/entities/goods_child_entity.dart';
import 'package:library_base/entities/tasks_entity.dart';

TasksEntity $TasksEntityFromJson(Map<String, dynamic> json) {
  final TasksEntity tasksEntity = TasksEntity();
  final String? purchaseId = jsonConvert.convert<String>(json['purchaseId']);
  if (purchaseId != null) {
    tasksEntity.purchaseId = purchaseId;
  }
  final String? purchaseOrderNumber = jsonConvert.convert<String>(json['purchaseOrderNumber']);
  if (purchaseOrderNumber != null) {
    tasksEntity.purchaseOrderNumber = purchaseOrderNumber;
  }
  final double? goodsCount = jsonConvert.convert<double>(json['goodsCount']);
  if (goodsCount != null) {
    tasksEntity.goodsCount = goodsCount;
  }
  final String? supplierName = jsonConvert.convert<String>(json['supplierName']);
  if (supplierName != null) {
    tasksEntity.supplierName = supplierName;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    tasksEntity.remark = remark;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    tasksEntity.createTime = createTime;
  }
  return tasksEntity;
}

Map<String, dynamic> $TasksEntityToJson(TasksEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['purchaseId'] = entity.purchaseId;
  data['purchaseOrderNumber'] = entity.purchaseOrderNumber;
  data['goodsCount'] = entity.goodsCount;
  data['supplierName'] = entity.supplierName;
  data['remark'] = entity.remark;
  data['createTime'] = entity.createTime;
  return data;
}
